export default {
    url: "/bpm/BpmXmlController/saveBPMXML",
    method: "POST",
    name:"新建/修改流程",
    req:[
        {
            en: "bpmData",
            type:"object",
            cn: "流程中的数据集合",
            children:[
                {
                    en:"nodes",
                    cn:"节点设置详情，是一个map，map的key为流程节点ID，格式为：节点的类型（首字母大写）+Event_+任意字符，如：StartEvent_1gpn97s，value字段如下：",
                    type:"object",
                    children:[
                        {
                            en:"id",
                            cn:"节点id，格式为：节点的类型（首字母需大写）+Event_+任意字符，如：StartEvent_1gpn97s",
                            type:"string"
                        },
                        {
                            en:"type",
                            cn:"该节点的类型，start 为开始节点，task 为流程流转节点， end 为结束节点",
                            type:"string"
                        },
                        {
                            en:"name",
                            cn:"节点名",
                            type:"string"
                        },
                        {
                            en:"fields",
                            cn:"表单字段",
                            type:"object",
                            children:[
                                {
                                    en:"allFields",
                                    cn:"该节点填写的字段",
                                    type:"object"
                                },
                                {
                                    en:"requiredFields",
                                    cn:"该节点必填字段",
                                    type:"object"
                                }
                            ]
                        },
                        {
                            en:"flow",
                            cn:"流转设置",
                            type:"object",
                            children:[
                                {
                                    en:"sponsor",
                                    cn:"主办人相关选项，confirm 明确指定主办人，none 无主办人会签，recipient 先接收者为主办人，默认为 confirm",
                                    type:"string"
                                },
                                {
                                    en:"countersign",
                                    cn:"是否允许会签，allow 允许会签，disallow 禁止会签，force 强制会签，默认为 disallow",
                                    type:"string"
                                },
                                {
                                    en:"concurrent",
                                    cn:"是否允许并发，allow 允许并发，disallow 禁止并发，force 强制并发，默认为 disallow",
                                    type:"string"
                                },
                                {
                                    en:"merge",
                                    cn:"并发合并选项，unforced 非强制合并，force 强制合并，默认为 unforced",
                                    type:"string"
                                },{
                                    en:"changeAgent",
                                    cn:"是否允许更改经办人，allow 是，disallow 否，默认为 allow",
                                    type:"string"
                                },
                                {
                                    en:"canSeeSign",
                                    cn:"会签意见可见性，always 总是可见，hideOnCurrentStep 本步骤经办人之间不可见，默认为 always",
                                    type:"string"
                                },
                                {
                                    en:"allowDynamic",
                                    cn:"动态并发，1 允许动态并发，0 禁止动态并发，默认为 0",
                                    type:""
                                },
                                {
                                    en:"msgTemp",
                                    cn:"默认提醒模板，模板使用格式为[变量], 其中变量可以为“流水号”、“流程名”，以及表单的字段名，默认为 '您有新的工作需要办理，流程id：[流水号]，流程：[流程名]'",
                                    type:"string"
                                }
                            ]
                        },
                        {
                            en:"smart",
                            cn:"智能选人",
                            type:"object",
                            children:[
                                {
                                    en:"filterRule",
                                    cn:"选人过滤规则，all 允许选择全部的经办人，self_dep 只允许选择本部门经办人，parallel_dep 只允许选择同级部门经办人，默认为 all",
                                    type:"string"
                                },
                                {
                                    en:"chooseRule",
                                    cn:"自动选人规则，none 不进行自动选择，publisher 自动选择流程发起人，self_manager 自动选择本部门主管，top_manager 自动选择上级主管领导，top_manager1 自动选择上级分管领导，from_form 根据表单字段选择，默认为 none",
                                    type:"string"
                                },
                                {
                                    en:"formFields",
                                    cn:"表单字段，当自动选人规则为'根据表单字段选择'时有效，仅针对选人和选部门控件",
                                    type:"object[]"
                                }
                            ]
                        },
                        {
                            en:"dealers",
                            cn:"处理人",
                            type:"object",
                            children:[
                                {
                                    en:"roles",
                                    cn:"角色ID，键值对形式",
                                    type:"object"
                                },
                                {
                                    en:"deps",
                                    cn:"部门ID，键值对形式",
                                    type:"object"
                                },
                                {
                                    en:"users",
                                    cn:"人员ID，键值对形式",
                                    type:"object"
                                }
                            ]
                        },
                        {
                            en:"config",
                            cn:"权限配置",
                            type:"object",
                            children:[
                                {
                                    en:"file",
                                    cn:"附件相关，allow 允许上传附件，disallow 禁止上传附件，force 强制上传附件，默认为 disallow",
                                    type:"string"
                                },
                                {
                                    en:"permission",
                                    cn:"该节点可操作权限，retreat 表示为允许回撤，allowBack 表示为允许回退",
                                    type:"object"
                                }
                            ]
                        },
                        {
                            en:"timeout",
                            cn:"超时提醒",
                            type:"object",
                            children:[
                                {
                                    en:"minValue",
                                    cn:"超时提醒时间，默认为 0",
                                    type:"string"
                                },
                                {
                                    en:"minUnit",
                                    cn:"超时提醒时间，单位：分钟/小时/天，默认为 小时",
                                    type:"string"
                                },
                                {
                                    en:"stepValue",
                                    cn:"超时提醒间隔，默认为 0",
                                    type:"string"
                                },
                                {
                                    en:"stepUnit",
                                    cn:"超时提醒间隔，单位：分钟/小时/天，默认为 小时",
                                    type:"string"
                                },
                                {
                                    en:"maxValue",
                                    cn:"最大超时提醒时间，默认为 0",
                                    type:"string"
                                },
                                {
                                    en:"maxUnit",
                                    cn:"最大超时提醒时间，单位：分钟/小时/天，默认为 小时",
                                    type:"string"
                                }
                            ]
                        },
                        {
                            en:"datasource",
                            cn:"数据源",
                            type:"object",
                            children:[
                                {
                                    en:"sql",
                                    cn:"数据源sql",
                                    type:"string"
                                },
                                {
                                    en:"enable",
                                    cn:"使用数据源选项：allow 允许数据源，none 禁止数据源，force 强制数据源，默认为 none",
                                    type:"string"
                                }
                            ]
                        },
                        {
                            en:"children",
                            cn:"子流程",
                            type:"object",
                            children:[
                                {
                                    en:"allows",
                                    cn:"允许开启的子流程，是一个map，map的key为子流程的模型ID，value字段如下：",
                                    type:"object",
                                    children:[
                                        {
                                            en:"name",
                                            cn:"流程名称",
                                            type:"object",
                                        },
                                        {
                                            en:"p2c",
                                            cn:"父子映射",
                                            type:"object",
                                            children:[
                                                {
                                                    en:"from",
                                                    cn:"从父流程绑定字段",
                                                    type:"string"
                                                },
                                                {
                                                    en:"to",
                                                    cn:"绑定字段到子流程",
                                                    type:"string"
                                                }
                                            ]
                                        },
                                        {
                                            en:"c2p",
                                            cn:"子父映射",
                                            type:"object",
                                            children:[
                                                {
                                                    en:"from",
                                                    cn:"从子流程绑定字段",
                                                    type:"string"
                                                },
                                                {
                                                    en:"to",
                                                    cn:"绑定字段到父流程",
                                                    type:"string"
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    en:"manual",
                                    cn:"手动开启子流程，1 为是，0 为否，默认为 0",
                                    type:"string"
                                },
                                {
                                    en:"force",
                                    cn:"强制开启子流程，1 为是，0 为否，默认为 0",
                                    type:"string"
                                },
                                {
                                    en:"finished",
                                    cn:"必须有一个完结的子流程，1 为是，0 为否，默认为 0",
                                    type:"string"
                                }
                            ]
                        },
                        {
                            en:"nextNodes",
                            cn:"流程节点流向",
                            type:"object",
                            children:[
                                {
                                    en:"node",
                                    cn:"流程节点ID",
                                    type:"string",
                                },
                                {
                                    en:"expression",
                                    cn:"条件表达式",
                                    type:"string",
                                }
                            ]
                        }
                    ]
                },
                {
                    en:"lines",
                    cn:"流程连接线条件设置，是一个map，map的key为流程连接线ID，格式为：SequenceFlow_+任意字符，如：SequenceFlow_0k6p23r，value字段如下：",
                    type:"object",
                    children: [
                        {
                            en:"conditions",
                            cn:"基础条件",
                            type:"object",
                            children:[
                                {
                                    en:"field",
                                    cn:"流程的字段名",
                                    type:"string",
                                },
                                {
                                    en:"op",
                                    cn:"运算符",
                                    type:"string",
                                },
                                {
                                    en:"value",
                                    cn:"字段值",
                                    type:"string",
                                }
                            ]
                        },
                        {
                            en:"expression",
                            cn:"高级条件，可对基础条件用and/or关键字进行组合",
                            type:"string"
                        }
                    ]
                },
                {
                    en:"listFields",
                    cn:"表单字段，用于任务管理中任务列表展示字段",
                    type:"object"
                },
                {
                    en:"workflowName",
                    cn:"流程名称",
                    type:"string"
                },
                {
                    en:"formId",
                    cn:"关联的表单ID",
                    type:"string"
                },
                {
                    en:"elseSetting",
                    cn:"流程其他设置",
                    type:"object",
                    children:[
                        {
                            en:"noticeOnComment",
                            cn:"批注时是否提醒经办人，y 为是，n 为否，默认为否 n",
                            type:"string"
                        }
                    ]
                },
                {
                    en:"trigger",
                    cn:"触发器",
                    type:"object",
                    children:[
                        {
                            en:"list",
                            cn:"",
                            type:"object",
                            children:[
                                {
                                    en:"name",
                                    cn:"触发器名称",
                                    type:"string",
                                },
                                {
                                    en:"event",
                                    cn:"触发器事件，EVENT_LOOP 定时触发，EVENT_CREATE 当任务被创建，EVENT_SAVE 当任务被保存，EVENT_GO_NEXT 当任务被提交，EVENT_END 当任务完结，EVENT_MQ 从MQ中接受消息",
                                    type:"string",
                                },
                                {
                                    en:"unit",
                                    cn:"定时触发单位",
                                    type:"string",
                                },
                                {
                                    en:"loop",
                                    cn:"定时触发时的时间",
                                    type:"string",
                                },
                                {
                                    en:"condition",
                                    cn:"触发器条件",
                                    type:"object",
                                    children:[
                                        {
                                            en:"field",
                                            cn:"字段名",
                                            type:"string"
                                        },
                                        {
                                            en:"op",
                                            cn:"运算符",
                                            type:"string"
                                        },
                                        {
                                            en:"value",
                                            cn:"字段值",
                                            type:"string"
                                        }
                                    ]
                                },
                                {
                                    en:"action",
                                    cn:"触发器行为",
                                    type:"object",
                                    children:[
                                        {
                                            en:"type",
                                            cn:"行为中的类型：ACTION_SEND_NOTICE 发送消息，ACTION_START_BPM 启动流程",
                                            type:"string"
                                        },
                                        {
                                            en:"args",
                                            cn:"",
                                            type:"object",
                                            children:[
                                                {
                                                    en:"to",
                                                    cn:"对某指定人进行特定操作，当类型为发送消息时，可以给 PUBLISHER 流程发起人/CURRENT_DEALERS 当前节点经办人/ALL_DEALERS 所有节点经办人/CAN_COMMENT 拥有批注权限的人 中任意一个进行发送消息；当类型为启动流程时，可以给 PUBLISHER 流程发起人/CURRENT_DEALERS 当前节点经办人/ALL_DEALERS 所有节点经办人 中任意一个启动新流程（如果没有执行权限则启动失败）",
                                                    type:"string"
                                                },
                                                {
                                                    en:"bpmId",
                                                    cn:"流程ID，当类型为启动流程时有效",
                                                    type:"string"
                                                },
                                                /*{
                                                    en:"custom",
                                                    cn:"",
                                                    type:"object",
                                                    children:[

                                                    ]
                                                },*/
                                                {
                                                    en:"content",
                                                    cn:"当类型为发送消息时的消息内容",
                                                    type:"string"
                                                }
                                            ]
                                        }
                                    ]
                                },
                            ]
                        }
                    ]
                }
            ]
        }
    ],
    reqEg:{"_id":"5df9a282809e540b3c8423c4","xml":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<definitions xmlns=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:dc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:di=\"http://www.omg.org/spec/DD/20100524/DI\" id=\"sid-38422fae-e03e-43a3-bef4-bd33b32041b2\" targetNamespace=\"http://bpmn.io/bpmn\" exporter=\"bpmn-js (https://demo.bpmn.io)\" exporterVersion=\"4.1.0-beta.0\">\n  <process id=\"Process_1\" isExecutable=\"false\">\n    <startEvent id=\"StartEvent_1gpn97s\" name=\"开始\">\n      <outgoing>SequenceFlow_0k6p23r</outgoing>\n    </startEvent>\n    <task id=\"Task_12upzpn\" name=\"节点\">\n      <incoming>SequenceFlow_0k6p23r</incoming>\n      <outgoing>SequenceFlow_1yhgr1r</outgoing>\n      <outgoing>SequenceFlow_03lq38l</outgoing>\n    </task>\n    <sequenceFlow id=\"SequenceFlow_0k6p23r\" sourceRef=\"StartEvent_1gpn97s\" targetRef=\"Task_12upzpn\" />\n    <endEvent id=\"EndEvent_0hhyqy8\" name=\"结束\">\n      <incoming>SequenceFlow_1yhgr1r</incoming>\n    </endEvent>\n    <sequenceFlow id=\"SequenceFlow_1yhgr1r\" sourceRef=\"Task_12upzpn\" targetRef=\"EndEvent_0hhyqy8\" />\n    <task id=\"Task_1hf8kgm\">\n      <incoming>SequenceFlow_03lq38l</incoming>\n    </task>\n    <sequenceFlow id=\"SequenceFlow_03lq38l\" sourceRef=\"Task_12upzpn\" targetRef=\"Task_1hf8kgm\" />\n  </process>\n  <bpmndi:BPMNDiagram id=\"BpmnDiagram_1\">\n    <bpmndi:BPMNPlane id=\"BpmnPlane_1\" bpmnElement=\"Process_1\">\n      <bpmndi:BPMNShape id=\"StartEvent_1gpn97s_di\" bpmnElement=\"StartEvent_1gpn97s\">\n        <dc:Bounds x=\"192\" y=\"92\" width=\"36\" height=\"36\" />\n        <bpmndi:BPMNLabel>\n          <dc:Bounds x=\"199\" y=\"135\" width=\"23\" height=\"14\" />\n        </bpmndi:BPMNLabel>\n      </bpmndi:BPMNShape>\n      <bpmndi:BPMNShape id=\"Task_12upzpn_di\" bpmnElement=\"Task_12upzpn\">\n        <dc:Bounds x=\"280\" y=\"70\" width=\"100\" height=\"80\" />\n      </bpmndi:BPMNShape>\n      <bpmndi:BPMNEdge id=\"SequenceFlow_0k6p23r_di\" bpmnElement=\"SequenceFlow_0k6p23r\">\n        <di:waypoint x=\"228\" y=\"110\" />\n        <di:waypoint x=\"280\" y=\"110\" />\n      </bpmndi:BPMNEdge>\n      <bpmndi:BPMNShape id=\"EndEvent_0hhyqy8_di\" bpmnElement=\"EndEvent_0hhyqy8\">\n        <dc:Bounds x=\"432\" y=\"92\" width=\"36\" height=\"36\" />\n        <bpmndi:BPMNLabel>\n          <dc:Bounds x=\"439\" y=\"135\" width=\"23\" height=\"14\" />\n        </bpmndi:BPMNLabel>\n      </bpmndi:BPMNShape>\n      <bpmndi:BPMNEdge id=\"SequenceFlow_1yhgr1r_di\" bpmnElement=\"SequenceFlow_1yhgr1r\">\n        <di:waypoint x=\"380\" y=\"110\" />\n        <di:waypoint x=\"432\" y=\"110\" />\n      </bpmndi:BPMNEdge>\n      <bpmndi:BPMNShape id=\"Task_1hf8kgm_di\" bpmnElement=\"Task_1hf8kgm\">\n        <dc:Bounds x=\"280\" y=\"200\" width=\"100\" height=\"80\" />\n      </bpmndi:BPMNShape>\n      <bpmndi:BPMNEdge id=\"SequenceFlow_03lq38l_di\" bpmnElement=\"SequenceFlow_03lq38l\">\n        <di:waypoint x=\"330\" y=\"150\" />\n        <di:waypoint x=\"330\" y=\"200\" />\n      </bpmndi:BPMNEdge>\n    </bpmndi:BPMNPlane>\n  </bpmndi:BPMNDiagram>\n</definitions>\n","desc":"请问企鹅","permissionSet":{"1125959918252195840":["sync","edit","comment"],"1059767604954005504":["comment"]},"pid":"5d6c8a07b7e4b720ec8ce9b2","modelName":"测阿萨为","bpmData":{"nodes":{"StartEvent_1gpn97s":{"id":"StartEvent_1gpn97s","name":"开始","type":"start","fields":{"allFields":["流程发起人"],"requiredFields":["流程发起人"]},"flow":{"sponsor":"confirm","countersign":"disallow","concurrent":"disallow","merge":"unforced","changeAgent":"allow","canSeeSign":"always","msgTemp":"您有新的工作需要办理，流程id：[流水号]，流程：[流程名]","allowDynamic":0},"smart":{"filterRule":"all","chooseRule":"from_form","targetRule":"StartEvent_1gpn97s","formFields":["发起人所在部门","借款人"]},"dealers":{"roles":{"2000007":"基础角色"},"deps":{"242":"中心支行市场部","250":"中心支行","251":"中心支行综合部","252":"中心支行风险部","269":"中心支行营业部"},"users":{"265":"高*丹","300":"曾*平"}},"config":{"permission":["retreat","allowBack"],"file":"allow"},"timeout":{"minValue":"0","stepValue":"0","maxValue":"0","minUnit":"小时","stepUnit":"小时","maxUnit":"小时"},"datasource":{"sql":"","enable":"none"},"children":{"allows":{},"manual":0,"force":0,"finished":0},"nextNodes":[{"node":"Task_12upzpn","expression":"(1  ||  2)"}]},"Task_12upzpn":{"id":"Task_12upzpn","name":"节点","type":"task","fields":{"allFields":[],"requiredFields":[]},"flow":{"sponsor":"confirm","countersign":"disallow","concurrent":"disallow","merge":"unforced","changeAgent":"allow","canSeeSign":"always","msgTemp":"您有新的工作需要办理，流程id：[流水号]，流程：[流程名]","allowDynamic":0},"smart":{"filterRule":"self_dep","chooseRule":"none","targetRule":"Task_12upzpn","formFields":[]},"dealers":{"roles":{"2000007":"基础角色","1207200889891328000":"流程服务管理员"},"deps":{},"users":{}},"config":{"permission":["retreat","allowBack"],"file":"disallow"},"timeout":{"minValue":"0","stepValue":"0","maxValue":"0","minUnit":"小时","stepUnit":"小时","maxUnit":"小时"},"datasource":{"sql":"","enable":"none"},"children":{"allows":{"5d7215e2eda7b736b0796e74":{"name":"测试的啊","p2c":[{"from":"流程发起人","to":"申请人"}],"c2p":[{"to":"利率定价","from":"出差地点"}]},"5d6d29aba1a81b4b6e131949":{"name":"文件传阅审批","p2c":[],"c2p":[]}},"manual":"1","force":0,"finished":0},"nextNodes":[{"node":"EndEvent_0hhyqy8","expression":"(calculate('申请事项','等于','2'))"},{"node":"Task_1hf8kgm","expression":""}]},"EndEvent_0hhyqy8":{"id":"EndEvent_0hhyqy8","type":"end","fields":{"allFields":[],"requiredFields":[]},"flow":{"sponsor":"confirm","countersign":"disallow","concurrent":"disallow","merge":"unforced","changeAgent":"allow","canSeeSign":"always","msgTemp":"您有新的工作需要办理，流程id：[流水号]，流程：[流程名]","allowDynamic":0},"smart":{"filterRule":"all","chooseRule":"none","targetRule":"EndEvent_0hhyqy8","formFields":[]},"dealers":{"roles":{"2000007":"基础角色"},"deps":{},"users":{}},"config":{"permission":[],"file":"disallow"},"timeout":{"minValue":"0","stepValue":"0","maxValue":"0","minUnit":"小时","stepUnit":"小时","maxUnit":"小时"},"datasource":{"sql":"","enable":"none"},"children":{"allows":{},"manual":0,"force":0,"finished":0},"nextNodes":[],"name":"结束"},"Task_1hf8kgm":{"id":"Task_1hf8kgm","type":"task","fields":{"allFields":[],"requiredFields":[]},"flow":{"sponsor":"confirm","countersign":"disallow","concurrent":"disallow","merge":"unforced","changeAgent":"allow","canSeeSign":"always","msgTemp":"您有新的工作需要办理，流程id：[流水号]，流程：[流程名]","allowDynamic":0},"smart":{"filterRule":"all","chooseRule":"none","targetRule":"","formFields":[]},"dealers":{"roles":{},"deps":{},"users":{}},"config":{"permission":[],"file":"disallow"},"timeout":{"minValue":"0","stepValue":"0","maxValue":"0","minUnit":"小时","stepUnit":"小时","maxUnit":"小时"},"datasource":{"sql":"","enable":"none"},"children":{"allows":{},"manual":0,"force":0,"finished":0},"nextNodes":[]}},"lines":{"SequenceFlow_0k6p23r":{"conditions":[{"field":"流程发起人","op":"等于","value":"1"},{"field":"发起人所在部门","op":"大于","value":"2"}],"expression":"1 or 2"},"SequenceFlow_1yhgr1r":{"conditions":[{"field":"申请事项","op":"等于","value":"2"}],"expression":""}},"listFields":["流程发起人"],"workflowName":"测阿萨为","formId":"5d36bc43561ed7372163fd89","elseSetting":{"noticeOnComment":"n"}},"trigger":{"list":[{"name":"新触发器","event":"EVENT_MQ","step":"","unit":"hour","condition":[{"field":"第一还款来源","op":"小于","value":"测试"}],"action":[{"type":"ACTION_SEND_NOTICE","args":{"to":"PUBLISHER","bpmId":"","custom":[],"content":"给拥有批注权限的人发送的内容"}}],"loop":"1111"}]}},
    respEg:{"success":true,"errMessage":"","data":"5df9a282809e540b3c8423c4"}

}